import java.io.*;

/**
 *
 等差数列 2，5，8，11，14。。。。,求合
 *
 *
 * @author: YuanChilde
 * @date: 2020-02-17 8:01
 * @version: 1.0
 * Modification History:
 * Date    Author      Version     Description
 * -----------------------------------------------------------------
 * 2020-02-17 8:01    YuanChilde     1.0        新增
 */
public class Demo16 {

    public static void main(String[] args){
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        String message;
        while(true){
            try {
                if (!((message=br.readLine())!=null))
                    break;
                int n=Integer.parseInt(message);
                int res=n*2+n*(n-1)*3/2;
                System.out.println(res);
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
